package com.yanqu.road.entity.enums.washe;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public enum eWasheDirectionType {

    Up(1, "上"),
    Right(2, "右"),
    Down(3, "下"),
    Left(4, "左"),

    ;

    private static Map<Integer, eWasheDirectionType> cache = new ConcurrentHashMap<>();

    static {
        for (eWasheDirectionType directionType : values()) {
            cache.put(directionType.getValue(), directionType);
        }
    }

    public static eWasheDirectionType getType(int value) {
        return cache.get(value);
    }

    private int value;
    private String desc;

    eWasheDirectionType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
